import java.util.Scanner;

public class demo01 {
    public static void main(String[]arge){
        int arr[]={19,28,37,46,50};
        Scanner sc = new Scanner(System.in);
        int num=sc.nextInt();
        int index=-1;
        for (int i=0;i<arr.length;i++){
               if (num==arr[i]){
                   index=i;
                   break;
               }
        }
        System.out.println(index);
    }
}
